package exception;

import java.nio.channels.FileLockInterruptionException;

public class ThrowDemo {
    public static void main(String[] args) {
        Student zz=new Student();

        try {
            zz.setAge(1000);
            System.out.println("年龄为"+ zz.getAge()+"岁了");
        } catch (IllegalAgeException e) {
            System.out.println("已经解决");
        }
    }
}
